﻿import lite.mobile.lib.WeeUIMain;
import lite.mobile.lib.components.IUComponent;

/**
 * @author alibber
 */
class lite.mobile.lib.components.UStage implements IUComponent {

	public function UStage() {
		initCoreMC();
	}

	private var _name : String = "UStage";
	private var _depth : Number = 0 ;
	public var $_coreMC : MovieClip;

	private function initCoreMC() : Void {
		$_coreMC = WeeUIMain.getInstance().getRoot().createEmptyMovieClip(_name, _depth);
		trace("//- : UStage创建了$_coreMC..." + $_coreMC);
	}

	public function getChildMC(ui : IUComponent) : MovieClip {
		var mc:MovieClip = $_coreMC.createEmptyMovieClip(ui.getName(), ui.getDepth());
		trace("//- : UComponent生成了子级mc..." + mc);
		trace(this._name);
		return mc ;
	}

	public function getCoreMC() : MovieClip {
		return $_coreMC ;
	}

	public function dependOnUI(ui : IUComponent) : Void {
		$_coreMC = ui.getChildMC(this);
	}

	public function getDepth() : Number {
		return _depth ;
	}

	public function getName() : String {
		return _name ;
	}

	public function getType() : String {
		// TODO: Auto-generated method stub
		return null;
	}

	public function setWidth(width : Number) : Void {
	}

	public function getWidth() : Number {
		// TODO: Auto-generated method stub
		return 0;
	}

	public function setHeight(height : Number) : Void {
	}

	public function getHeight() : Number {
		// TODO: Auto-generated method stub
		return 0;
	}

	public function isKey() : Boolean {
		// TODO: Auto-generated method stub
		return null;
	}

	public function enabledKey() : Void {
	}

	public function invalidismKey() : Void {
	}

	public function isFocus() : Boolean {
		// TODO: Auto-generated method stub
		return null;
	}

	public function enabledFocus() : Void {
	}

	public function invalidismFocus() : Void {
	}

	public function toString2() : String {
		// TODO: Auto-generated method stub
		return null;
	}
}
